﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AAA.DesignPattern.Observer;
using AAA.DataSource;
using AAA.Meta.Quote.Data;
using AAA.TradeLanguage.Data;

namespace AAA.TradeLanguage
{
    public interface ISignal : IFunctionMeta, IDataAccess, IObserver, ISubject
    {
        PositionManager PositionManager { get; set; }

        int Offset { get; set; }

        int MinEntryPosition { get; set; }
        int MaxPosition { get; set; }

        string BaseSymbolId { get; set; }
        string SignalGroupName { get; set; }
        BarCompression DataCompression { get; }
        void SetCurrentTime(CurrentTime currentTime);

        void BeforeSignal();
        void Calculate();
        void ExecCalculate();
        void AfterSignal();

        void LongEntry(string strName, PriceTimeTypeEnum ePriceTimeType, OrderTypeEnum eOrderType, float fPrice);
        void ShortEntry(string strName, PriceTimeTypeEnum ePriceTimeType, OrderTypeEnum eOrderType, float fPrice);
        void LongExit(string strName, PriceTimeTypeEnum ePriceTimeType, OrderTypeEnum eOrderType, float fPrice);
        void ShortExit(string strName, PriceTimeTypeEnum ePriceTimeType, OrderTypeEnum eOrderType, float fPrice);
        void TrailingStop(float fPoint);
        void VolumeStop(float fVolume);
        void SingleBarStop(float fPoint);

        void MatchPrice(float fPrice);
        void ResetPerformance();
        void VerifyPrice(VerifyPathEnum eVerifyPath);

        List<SignalRecord> TradeRecord();
    }
}
